<template>
  <div>
     <x-header title="我的评价" :right-options="{showMore: false}" @on-click-more="show = true"></x-header> 

    <evaluate-page :evalDatas="evalDatas"></evaluate-page>
  </div>
</template>

<script>
import { XHeader } from 'vux'
import OrderPage from '../../components/toolComponent/myOrderPage.vue'
import evaluatePage from '../../components/toolComponent/myEvaluate'
import { homeUrl } from "../../components/utils/utils.js";
import axios from "axios";
import qs from "qs";
//   import Top from '../components/layouts/top.vue'
//   import Bottom from '../components/layouts/bottom.vue'
  export default {
    components: { XHeader,OrderPage,evaluatePage},
    data(){
      return{
        evalDatas:[],
        wxOpenId:localStorage.getItem("openid"),
      }
    },
    methods:{
      //评论列表请求
      myEvalReq(){
        var datas = qs.stringify({
        wxid:this.wxOpenId,
      });
      axios
        .post(homeUrl() + "commentJsonQuery/", datas, { emulateJSON: true })
        .then(
          result => {
            console.log(result);
            if(result.data.status=="ok"){
              this.evalDatas=result.data.data
            }
           
          },
          error => {
            this.$vux.toast.text("网络请求失败....", "bottom");
            console.log(error);
          }
        );
      }
    },
    created(){
      this.myEvalReq()
    }
  }
</script>

<style>
 
</style>
